Complex computer programs are nowadays typically developed using model-driven engineering. That is, instead of directly writing the software code, graphical models are created, from which the actual code may then be automatically or semi-automatically generated. Model-driven engineering is not only used for the development of software, but is also applied for the development and manufacturing of complex technical products, such as automobiles or other machinery. Further, not only products but also processes can be defined using models, and software applications can be used which then control the proper execution of the process steps in accordance with the model. This applies to the development, design and execution of processes such as the sequence of steps to be executed on an assembly belt, or even a business process that defines a certain sequence of tasks to be executed by software components and/or personnel to accomplish an overall complex task.
Generally, a graphical model comprises objects and relations therebetween in accordance with a predefined format and for a given purpose. A given object may occur in different models, e.g. an object representing a certain software component may occur both in a structural diagram (to define its interfaces to other components) and in a flow chart (to define its interaction with other components). Accordingly, a model may be generally understood as a particular “view” on an underlying object net.
With the increasing complexity of such models, it is desired to execute queries on the modelled object net in order to analyse the modelled subject-matter. For example, one might ask “which other components must have finished their processing in order for my component to function properly?”.
Apparently, such a query involves relationships between multiple objects, which might be scattered across various different models. More importantly, such relationships might not be modelled explicitly, but oftentimes can only be implicitly derived from the various models. Moreover, complex subject-matter is typically modelled using a variety of different modelling languages, so that a given object might be represented completely differently in different models. For these reasons, querying a complex object net is a very difficult and complex task.
In the prior art, a number of approaches have been proposed to query graphical models. In the field of business process modelling, various Business Process Management (BPM) products are known which allow the modelling of business processes and which control their execution. Examples of such BPM solutions are Signavio, BOC Group Adonis, Mega, and Casewise. To analyse such business models, conventional BPM products typically provide scripting languages or SQL (Structured Query Language) interfaces for formulating queries. However, a drawback of these approaches is that the user has to formulate queries in a complex and difficult to learn scripting language. Also, in order to formulate meaningful queries, the user has to have an in-depth knowledge of the model to be analysed.
Some conventional approaches propose graphical query builders that attempt to assist the user in that queries can be formulated graphically. An example is the Graphical Query Builder (GQB) included in the PostgreSQL tools (cf. http://www.pgadmin.org/docs/dev/gqb.html), which is a typical example of a graphical SQL query builder. Another example is described in “Graphical Query Specification and Dynamic Result previews for a Digital Library” of S. Jones (UIST'98 Proceedings of the 11th annual ACM symposium on User interface software and technology, pages 143-151, ACM New York, N.Y., USA, 1998, ISBN: 1-58113-034-1). U.S. Pat. No. 7,383,513 described a similar approach. However, also in these approaches the user has to exactly know the underlying database structure. Further, the above cited graphical query builder can only be used for querying data sources which offer an SQL interface. Lastly, a further drawback is that if the structure of the underlying SQL database changes, all queries defined thus far might not work anymore. Further examples of graphical query builders based on BPM are Cogniscape, Metastorm/OpenText, SAP BEx Query Designer, IBM Cognos, Oracle Hyperion, and Oracle BI Foundation Suite.
U.S. Pat. No. 6,609,123 describes a system to graphically design queries on one or more data sources by building a common meta model above the meta model of the different data sources. The patent teaches to export the so-called meta model of the data source(s), transform them and import them to a own repository. Queries can then be created on this repository. However, each time the meta model of a data source changes, the export and import procedure has to be repeated, which is particularly disadvantageous when dealing with highly dynamic models which change at a rapid pace.
Further, formal approaches are known to perform so-called “model checking” using specific languages. An example is SemQuu (cf. “Process Model Verification with SemQuu” of M. Feldmann et al., available at http://subs.emis.de/LNI/Proceedings/Proceedings190/231.pdf), which can be used to assess the formal correctness of models.
In summary, a common drawback of the conventional techniques—irrespective of whether the queries are defined graphically or not—is that the query creator still needs an in-depth knowledge of the structure and semantics of the underlying models to be queried, which makes the query formulation a difficult and in part even impossible task. Further, the above explained products are mostly designed for a particular type of modelling technique, which makes it difficult or even impossible to perform meaningful analyses on subject-matter modelled by different heterogeneous modelling techniques.
It is therefore the technical problem underlying certain example embodiments to enable the creation of queries executable on models which does not require in-depth knowledge of the underlying data structures, thereby facilitating the formulation of correct and meaningful queries and thereby at least partly overcoming the above explained disadvantages of the prior art.
This problem is according to one aspect of certain example embodiments solved by a system for creating queries on model data of at least one data source in accordance with at least one data source specific format. In the embodiment of claim 1, the system comprises:    a. a graphical query builder, configured for enabling a user to graphically define a query comprising a plurality of building blocks in accordance with a data source independent format; and    b. at least one adapter for the at least one data source, configured for translating the query in the data source independent format into at least one corresponding query in the data source specific format.
Accordingly, the embodiment generally relates to the graphical creation of queries on model data, wherein such model data is present in at least one data source, such as a file system, a database, or even retrievable “on the fly” from a software application producing such data (in the sense of streaming data). The model data adheres to a data source specific format, i.e. to a format that is specific to the corresponding data source. The model data may represent graphical model data, such as class diagrams in UML (Unified Modelling Language) notation, which adhere to the UML meta model, or “Event-driven process chain” (EPC) diagrams, which adhere to the meta model defined by the ARIS product of applicant. Further, model data may also comprise non-graphical model data, such as data of an SAP system. Accordingly, a user wanting to formulate a query on such a data source specific model data would normally need a comprehensive knowledge not only of the meaning and semantics of the respective modelling language, but also of the specific format and contents of the model(s) to be queried.
The above embodiment solves this problem in that it provides a graphical query builder to the user, which enables the user to graphically define queries in accordance with a data source independent format. In other words, the user can graphically assemble building blocks for the desired query, wherein the building blocks are independent of the particular format of the underlying data source to be queried. The data source independent format (which is common to all data sources in case there is more than one data source) can be understood as a single meta model that is common to all underlying data sources. This way, the formulation of queries is facilitated to a great extent.
In order to process a query formulated in the data source independent format, certain example embodiments further provide adapter(s) for the respective data source(s) to be queried, which are configured for translating the query in the data source independent format into at least one corresponding query in the data source specific format.
In one aspect of certain example embodiments, the graphical query builder is further configured for enabling the user to select one or more building blocks for defining the query in the data source independent format, wherein each building block represents a query object or a query relation. Accordingly, the query in the data source independent format can be understood preferably as a graph, most preferably as a directed graph. As will be appreciated by the person skilled in the art, a graph structure generally consists of nodes and edges connecting the nodes. Since the building blocks in the data source independent format are preferably either query objects or query relations, the task of formulating a query is particularly easy for the user. Moreover, the user does not have to have any knowledge of the format of the data source specific format of the respective data source to be queried, but only has to connect data source independent objects and relations in order to formulate queries. Preferably, a query relation can be a relation between two query objects, a filter relation and/or a user-defined relation, as will be explained in more detail further below.
In another aspect of certain example embodiments, the system further comprises a first adapter for a first data source and a second adapter for a second data source, the first and second data sources being heterogeneous, wherein each of the first and second adapters is configured for translating at least a part of the same query in the data source independent format into a corresponding partial query in the respective data source specific format.
Accordingly, also an object net whose elements are distributed among multiple data sources can be queried by one single data source independent query. This is achieved in that a suitable adapter is provided for each data source, which translated the relevant parts of the single data source independent query into one or more queries in the format required by the respective data source. In this context, two data sources are understood as heterogeneous if they adhere to different formats, i.e. meta models (such as the above-mentioned ARIS EPC and UML models).
The system may be configured for combining the results of the partial queries in order to generate a single result for the query in the data source independent format.
Preferably, the graphical query builder is configured for enabling the user to graphically define queries in an iterative manner. As will be further explained in the detailed description, once a user has selected a certain query object (corresponding to a node in the query graph), the system may present all possible query relations that are connectable to the selected query object to the user. Upon selection of one of the query relations, the system may provide the user with all query objects that are connectable thereto, and so on. Accordingly, the user is enabled to formulate arbitrarily complex graphical queries in a step-wise manner without having to know the format of the underlying data source(s) to be queried.
In yet another aspect, the at least one adapter is a web service, preferably a RESTful web service. The web services are preferably configured for communicating with the graphical query builder using HTTP. Realizing the adapter(s) as RESTful web service(s) is a particularly preferred implementation of certain example embodiments, which is highly flexible and scalable, as will be explained in more detail further below.
Preferably, each adapter implements a common API (application programming interface) for providing access to the model data in the respective data source. Accordingly, the graphical query builder may communicate with the one or more adapters only via the common API. This way, additional adapters can be flexibly added to the overall system in order to adapt the system to new types of data sources.
The system may be further configured for storing the query in the data source independent format on a storage medium, and for using stored queries for graphically defining one or more further queries. This way, it is possible for a user to define particularly complex queries based on sub-queries that were created previously.
In yet another aspect of certain example embodiments, the at least one adapter is configured for accessing the at least one data source in accordance with an authorization and/or authentication mechanism. Accordingly, it is ensured that a user can only query model data for which the user is allowed, thereby ensuring the security and confidentiality of the model data.
Certain example embodiments also provide a method for creating queries on model data of at least one data source in accordance with at least one data source specific format. In one embodiment, the method comprises the step of graphically defining a query with a graphical query builder, the query comprising a plurality of building blocks in accordance with a data source independent format, and the step of translating, by at least one adapter for the at least one data source, the query in the data source independent format into at least one corresponding query in the data source specific format. Further advantageous modifications of embodiments of the method of the invention are defined in further dependent claims.
Lastly, certain example embodiments also concern a computer program comprising instructions for implementing any of the above-explained methods, and non-transitory computer readable storage media tangibly storing such programs.